package com.sky.mapper;

import com.sky.entity.DishFlavor;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper

public interface DishFlavorMapper {

    /**
     * 插入口味
     * @param flavors
     */
    void insertFlavor(List<DishFlavor> flavors);

    /**
     * 删除口味
     * @param dishId
     */
    @Delete("DELETE FROM dish_flavor where dish_id=#{dishId}")
    void deleteFlavor(Long dishId);


    /**
     * 根据菜品id查找口味
     * @param id
     * @return
     */
    List<DishFlavor> selectFlavorById(Long id);
}

